3.67 \(\int \frac {\tan ^5(c+d x)}{(a+i a \tan (c+d x))^3} \, dx\)

Optimal. Leaf size=143 \[ \frac {3 \tan ^2(c+d x)}{2 d \left (a^3+i a^3 \tan (c+d x)\right )}+\frac {25 i \tan (c+d x)}{8 a^3 d}+\frac {3 \log (\cos (c+d x))}{a^3 d}-\frac {25 i x}{8 a^3}-\frac {\tan ^4(c+d x)}{6 d (a+i a \tan (c+d x))^3}+\frac {11 i \tan ^3(c+d x)}{24 a d (a+i a \tan (c+d x))^2} \]

[Out]

-25/8*I*x/a^3+3*ln(cos(d*x+c))/a^3/d+25/8*I*tan(d*x+c)/a^3/d-1/6*tan(d*x+c)^4/d/(a+I*a*tan(d*x+c))^3+11/24*I*t
an(d*x+c)^3/a/d/(a+I*a*tan(d*x+c))^2+3/2*tan(d*x+c)^2/d/(a^3+I*a^3*tan(d*x+c))

________________________________________________________________________________________

Rubi [A]  time = 0.29, antiderivative size = 143, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3558, 3595, 3525, 3475} \[ \frac {3 \tan ^2(c+d x)}{2 d \left (a^3+i a^3 \tan (c+d x)\right )}+\frac {25 i \tan (c+d x)}{8 a^3 d}+\frac {3 \log (\cos (c+d x))}{a^3 d}-\frac {25 i x}{8 a^3}-\frac {\tan ^4(c+d x)}{6 d (a+i a \tan (c+d x))^3}+\frac {11 i \tan ^3(c+d x)}{24 a d (a+i a \tan (c+d x))^2} \]

Antiderivative was successfully verified.

[In]

Int[Tan[c + d*x]^5/(a + I*a*Tan[c + d*x])^3,x]

[Out]

(((-25*I)/8)*x)/a^3 + (3*Log[Cos[c + d*x]])/(a^3*d) + (((25*I)/8)*Tan[c + d*x])/(a^3*d) - Tan[c + d*x]^4/(6*d*
(a + I*a*Tan[c + d*x])^3) + (((11*I)/24)*Tan[c + d*x]^3)/(a*d*(a + I*a*Tan[c + d*x])^2) + (3*Tan[c + d*x]^2)/(
2*d*(a^3 + I*a^3*Tan[c + d*x]))

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3525

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(a*c - b
*d)*x, x] + (Dist[b*c + a*d, Int[Tan[e + f*x], x], x] + Simp[(b*d*Tan[e + f*x])/f, x]) /; FreeQ[{a, b, c, d, e
, f}, x] && NeQ[b*c - a*d, 0] && NeQ[b*c + a*d, 0]

Rule 3558

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> -Si
mp[((b*c - a*d)*(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^(n - 1))/(2*a*f*m), x] + Dist[1/(2*a^2*m), Int[(a
+ b*Tan[e + f*x])^(m + 1)*(c + d*Tan[e + f*x])^(n - 2)*Simp[c*(a*c*m + b*d*(n - 1)) - d*(b*c*m + a*d*(n - 1))
- d*(b*d*(m - n + 1) - a*c*(m + n - 1))*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c -
a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && LtQ[m, 0] && GtQ[n, 1] && (IntegerQ[m] || IntegersQ[2*m,
2*n])

Rule 3595

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_), x_Symbol] :> -Simp[((A*b - a*B)*(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^n)/(2*a*f*
m), x] + Dist[1/(2*a^2*m), Int[(a + b*Tan[e + f*x])^(m + 1)*(c + d*Tan[e + f*x])^(n - 1)*Simp[A*(a*c*m + b*d*n
) - B*(b*c*m + a*d*n) - d*(b*B*(m - n) - a*A*(m + n))*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A,
B}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && LtQ[m, 0] && GtQ[n, 0]

Rubi steps

\begin {align*} \int \frac {\tan ^5(c+d x)}{(a+i a \tan (c+d x))^3} \, dx &=-\frac {\tan ^4(c+d x)}{6 d (a+i a \tan (c+d x))^3}-\frac {\int \frac {\tan ^3(c+d x) (-4 a+7 i a \tan (c+d x))}{(a+i a \tan (c+d x))^2} \, dx}{6 a^2}\\ &=-\frac {\tan ^4(c+d x)}{6 d (a+i a \tan (c+d x))^3}+\frac {11 i \tan ^3(c+d x)}{24 a d (a+i a \tan (c+d x))^2}+\frac {\int \frac {\tan ^2(c+d x) \left (-33 i a^2-39 a^2 \tan (c+d x)\right )}{a+i a \tan (c+d x)} \, dx}{24 a^4}\\ &=-\frac {\tan ^4(c+d x)}{6 d (a+i a \tan (c+d x))^3}+\frac {11 i \tan ^3(c+d x)}{24 a d (a+i a \tan (c+d x))^2}+\frac {3 \tan ^2(c+d x)}{2 d \left (a^3+i a^3 \tan (c+d x)\right )}-\frac {\int \tan (c+d x) \left (144 a^3-150 i a^3 \tan (c+d x)\right ) \, dx}{48 a^6}\\ &=-\frac {25 i x}{8 a^3}+\frac {25 i \tan (c+d x)}{8 a^3 d}-\frac {\tan ^4(c+d x)}{6 d (a+i a \tan (c+d x))^3}+\frac {11 i \tan ^3(c+d x)}{24 a d (a+i a \tan (c+d x))^2}+\frac {3 \tan ^2(c+d x)}{2 d \left (a^3+i a^3 \tan (c+d x)\right )}-\frac {3 \int \tan (c+d x) \, dx}{a^3}\\ &=-\frac {25 i x}{8 a^3}+\frac {3 \log (\cos (c+d x))}{a^3 d}+\frac {25 i \tan (c+d x)}{8 a^3 d}-\frac {\tan ^4(c+d x)}{6 d (a+i a \tan (c+d x))^3}+\frac {11 i \tan ^3(c+d x)}{24 a d (a+i a \tan (c+d x))^2}+\frac {3 \tan ^2(c+d x)}{2 d \left (a^3+i a^3 \tan (c+d x)\right )}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 2.46, size = 239, normalized size = 1.67 \[ \frac {\sec ^3(c+d x) (\cos (d x)+i \sin (d x))^3 (-138 \sin (c) \sin (2 d x)-21 \sin (c) \sin (4 d x)+300 d x \sin (3 c)+2 \sin (3 c) \sin (6 d x)-138 i \sin (c) \cos (2 d x)-21 i \sin (c) \cos (4 d x)+2 i \sin (3 c) \cos (6 d x)+\cos (c) (39 \cos (d x)+53 i \sin (d x)) (-3 \cos (3 d x)+3 i \sin (3 d x))-96 \sin (3 c) \sec (c) \sin (d x) \sec (c+d x)+288 i \sin (3 c) \log (\cos (c+d x))+\cos (3 c) (288 \log (\cos (c+d x))+96 i \sec (c) \sin (d x) \sec (c+d x)-300 i d x+2 i \sin (6 d x)-2 \cos (6 d x)))}{96 d (a+i a \tan (c+d x))^3} \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[c + d*x]^5/(a + I*a*Tan[c + d*x])^3,x]

[Out]

(Sec[c + d*x]^3*(Cos[d*x] + I*Sin[d*x])^3*((-138*I)*Cos[2*d*x]*Sin[c] - (21*I)*Cos[4*d*x]*Sin[c] + 300*d*x*Sin
[3*c] + (2*I)*Cos[6*d*x]*Sin[3*c] + (288*I)*Log[Cos[c + d*x]]*Sin[3*c] - 96*Sec[c]*Sec[c + d*x]*Sin[3*c]*Sin[d
*x] - 138*Sin[c]*Sin[2*d*x] + Cos[c]*(39*Cos[d*x] + (53*I)*Sin[d*x])*(-3*Cos[3*d*x] + (3*I)*Sin[3*d*x]) - 21*S
in[c]*Sin[4*d*x] + Cos[3*c]*((-300*I)*d*x - 2*Cos[6*d*x] + 288*Log[Cos[c + d*x]] + (96*I)*Sec[c]*Sec[c + d*x]*
Sin[d*x] + (2*I)*Sin[6*d*x]) + 2*Sin[3*c]*Sin[6*d*x]))/(96*d*(a + I*a*Tan[c + d*x])^3)

________________________________________________________________________________________

fricas [A]  time = 0.44, size = 120, normalized size = 0.84 \[ \frac {-588 i \, d x e^{\left (8 i \, d x + 8 i \, c\right )} - 6 \, {\left (98 i \, d x + 55\right )} e^{\left (6 i \, d x + 6 i \, c\right )} + 288 \, {\left (e^{\left (8 i \, d x + 8 i \, c\right )} + e^{\left (6 i \, d x + 6 i \, c\right )}\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - 117 \, e^{\left (4 i \, d x + 4 i \, c\right )} + 19 \, e^{\left (2 i \, d x + 2 i \, c\right )} - 2}{96 \, {\left (a^{3} d e^{\left (8 i \, d x + 8 i \, c\right )} + a^{3} d e^{\left (6 i \, d x + 6 i \, c\right )}\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^5/(a+I*a*tan(d*x+c))^3,x, algorithm="fricas")

[Out]

1/96*(-588*I*d*x*e^(8*I*d*x + 8*I*c) - 6*(98*I*d*x + 55)*e^(6*I*d*x + 6*I*c) + 288*(e^(8*I*d*x + 8*I*c) + e^(6
*I*d*x + 6*I*c))*log(e^(2*I*d*x + 2*I*c) + 1) - 117*e^(4*I*d*x + 4*I*c) + 19*e^(2*I*d*x + 2*I*c) - 2)/(a^3*d*e
^(8*I*d*x + 8*I*c) + a^3*d*e^(6*I*d*x + 6*I*c))

________________________________________________________________________________________

giac [A]  time = 9.70, size = 91, normalized size = 0.64 \[ \frac {\frac {6 \, \log \left (\tan \left (d x + c\right ) + i\right )}{a^{3}} - \frac {294 \, \log \left (i \, \tan \left (d x + c\right ) + 1\right )}{a^{3}} + \frac {96 i \, \tan \left (d x + c\right )}{a^{3}} + \frac {539 \, \tan \left (d x + c\right )^{3} - 1245 i \, \tan \left (d x + c\right )^{2} - 981 \, \tan \left (d x + c\right ) + 259 i}{a^{3} {\left (\tan \left (d x + c\right ) - i\right )}^{3}}}{96 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^5/(a+I*a*tan(d*x+c))^3,x, algorithm="giac")

[Out]

1/96*(6*log(tan(d*x + c) + I)/a^3 - 294*log(I*tan(d*x + c) + 1)/a^3 + 96*I*tan(d*x + c)/a^3 + (539*tan(d*x + c
)^3 - 1245*I*tan(d*x + c)^2 - 981*tan(d*x + c) + 259*I)/(a^3*(tan(d*x + c) - I)^3))/d

________________________________________________________________________________________

maple [A]  time = 0.12, size = 112, normalized size = 0.78 \[ \frac {i \tan \left (d x +c \right )}{d \,a^{3}}+\frac {\ln \left (\tan \left (d x +c \right )+i\right )}{16 d \,a^{3}}+\frac {31 i}{8 d \,a^{3} \left (\tan \left (d x +c \right )-i\right )}-\frac {i}{6 d \,a^{3} \left (\tan \left (d x +c \right )-i\right )^{3}}-\frac {9}{8 d \,a^{3} \left (\tan \left (d x +c \right )-i\right )^{2}}-\frac {49 \ln \left (\tan \left (d x +c \right )-i\right )}{16 d \,a^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(d*x+c)^5/(a+I*a*tan(d*x+c))^3,x)

[Out]

I/d/a^3*tan(d*x+c)+1/16/d/a^3*ln(tan(d*x+c)+I)+31/8*I/d/a^3/(tan(d*x+c)-I)-1/6*I/d/a^3/(tan(d*x+c)-I)^3-9/8/d/
a^3/(tan(d*x+c)-I)^2-49/16/d/a^3*ln(tan(d*x+c)-I)

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^5/(a+I*a*tan(d*x+c))^3,x, algorithm="maxima")

[Out]

Exception raised: RuntimeError >> ECL says: Error executing code in Maxima: expt: undefined: 0 to a negative e
xponent.

________________________________________________________________________________________

mupad [B]  time = 3.81, size = 122, normalized size = 0.85 \[ -\frac {\frac {35}{12\,a^3}-\frac {31\,{\mathrm {tan}\left (c+d\,x\right )}^2}{8\,a^3}+\frac {\mathrm {tan}\left (c+d\,x\right )\,53{}\mathrm {i}}{8\,a^3}}{d\,\left (-{\mathrm {tan}\left (c+d\,x\right )}^3\,1{}\mathrm {i}-3\,{\mathrm {tan}\left (c+d\,x\right )}^2+\mathrm {tan}\left (c+d\,x\right )\,3{}\mathrm {i}+1\right )}-\frac {49\,\ln \left (\mathrm {tan}\left (c+d\,x\right )-\mathrm {i}\right )}{16\,a^3\,d}+\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )}{16\,a^3\,d}+\frac {\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}{a^3\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(c + d*x)^5/(a + a*tan(c + d*x)*1i)^3,x)

[Out]

log(tan(c + d*x) + 1i)/(16*a^3*d) - (49*log(tan(c + d*x) - 1i))/(16*a^3*d) - ((tan(c + d*x)*53i)/(8*a^3) + 35/
(12*a^3) - (31*tan(c + d*x)^2)/(8*a^3))/(d*(tan(c + d*x)*3i - 3*tan(c + d*x)^2 - tan(c + d*x)^3*1i + 1)) + (ta
n(c + d*x)*1i)/(a^3*d)

________________________________________________________________________________________

sympy [A]  time = 1.27, size = 212, normalized size = 1.48 \[ \begin {cases} \frac {\left (- 35328 a^{6} d^{2} e^{10 i c} e^{- 2 i d x} + 5376 a^{6} d^{2} e^{8 i c} e^{- 4 i d x} - 512 a^{6} d^{2} e^{6 i c} e^{- 6 i d x}\right ) e^{- 12 i c}}{24576 a^{9} d^{3}} & \text {for}\: 24576 a^{9} d^{3} e^{12 i c} \neq 0 \\x \left (\frac {i \left (- 49 e^{6 i c} + 23 e^{4 i c} - 7 e^{2 i c} + 1\right ) e^{- 6 i c}}{8 a^{3}} + \frac {49 i}{8 a^{3}}\right ) & \text {otherwise} \end {cases} - \frac {2}{a^{3} d e^{2 i c} e^{2 i d x} + a^{3} d} - \frac {49 i x}{8 a^{3}} + \frac {3 \log {\left (e^{2 i d x} + e^{- 2 i c} \right )}}{a^{3} d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)**5/(a+I*a*tan(d*x+c))**3,x)

[Out]

Piecewise(((-35328*a**6*d**2*exp(10*I*c)*exp(-2*I*d*x) + 5376*a**6*d**2*exp(8*I*c)*exp(-4*I*d*x) - 512*a**6*d*
*2*exp(6*I*c)*exp(-6*I*d*x))*exp(-12*I*c)/(24576*a**9*d**3), Ne(24576*a**9*d**3*exp(12*I*c), 0)), (x*(I*(-49*e
xp(6*I*c) + 23*exp(4*I*c) - 7*exp(2*I*c) + 1)*exp(-6*I*c)/(8*a**3) + 49*I/(8*a**3)), True)) - 2/(a**3*d*exp(2*
I*c)*exp(2*I*d*x) + a**3*d) - 49*I*x/(8*a**3) + 3*log(exp(2*I*d*x) + exp(-2*I*c))/(a**3*d)

________________________________________________________________________________________